package com.zlll.winner.service.bbs;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zlll.winner.business.model.bbs.BbsPostMedia;
import com.zlll.winner.business.service.bbs.IBbsPostMediaService;
import com.zlll.winner.mapper.bbs.BbsPostMediaMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Service;

import java.util.List;


/**
 * <p>
 * 论坛帖子媒体表 服务实现类
 * </p>
 *
 * @author Walert
 * @since 2019-09-17
 */
@Service
@Slf4j
public class BbsPostMediaServiceImpl extends ServiceImpl<BbsPostMediaMapper, BbsPostMedia> implements IBbsPostMediaService {



    /**
     * 根据贴子查询贴子媒体列表
     *
     * @param postId
     * @return
     */
    @Override
    public List<BbsPostMedia> selectListByPostId(Long postId) {
        List<BbsPostMedia> mediaList = baseMapper.selectList(Wrappers.<BbsPostMedia>lambdaQuery().eq(BbsPostMedia::getPostId, postId));
        return mediaList;
    }



}
